<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>{%$web_name%}</title>
<meta name="description" content="{%$web_description%}">
<meta name="keywords" content="{%$web_keywords%}">
<link href="{%$URL%}style.css" rel="stylesheet" type="text/css">
<link href="{%$URL%}mx.ico" rel="shortcut icon"/>
<script src="{%$URL%}jquery-1.7.1.min.js"></script>
<script src="{%$URL%}defalut.js"></script>
<script type="text/javascript">
/*删除购物车中的产品*/
function del_shopping(id){
	if(id){
		$.post("index.php?a=del_shopping",{id:id},function(data){
			if(data){
				if(data=="yes"){
					msg_tips("亲，删除成功！","")
					$("#shopping_list_"+id).remove();//移除删除的产品
					}else{
						msg_tips("亲，删除失败！","")
						}
				}else{
					msg_tips("亲，请求超时，请稍候重试！","")
					}
			})
		}else{
			msg_tips("亲，请求参数有误！","")
			}
	}
</script>
</head>
<body>
<div id="body">{%include file='head.htm'%}
  <div id="middle">
    <div id="left">
      <div id="type">
        <div class="title">
          <h1>栏目分类</h1>
        </div>
        <ul>
          <li><a href="index.php?p=user">会员信息</a></li>
          <li><a href="index.php?p=shoppingcart_list">购物车</a></li>
          <li><a href="index.php?p=dingdan_list">订单管理</a></li>
          <li><a href="index.php?p=user_zt">高级会员</a></li>
          <li><a href="user_logout.php">退出会员</a></li>
        </ul>
      </div>
      <!-- type --></div>
    <!-- left -->
    <div id="right">
      <div class="title">
        <h1>购物车</h1>
        <h3><a href="index.php">首页</a> > 会员中心</h3>
      </div>
      <div id="con">
        <ul id="gwc">
          {%lcmx_shoppingcar_list set="列表名:shoppingcar,显示数目:10,分页显示:1,登录页:index.php?p=user"%}
          {%if $shoppingcar%}
          {%foreach from=$shoppingcar item=list%}
          <li id="shopping_list_{%$list.lc_id%}">
            <div class="left"> <img src="{%$list.product_pic%}" border="0" />{%$list.product_name%}</div>
            <div class="right">
                <a href="index.php?p=products_show&id={%$list.lc_id%}">{%$list.lc_price%}元</a>
                <a onClick="del_shopping({%$list.lc_id%})">删除</a>
                <a href="index.php?p=products_show&id={%$list.lc_id%}">查看商品</a>
            </div>
          </li>
          {%/foreach%}
          <center>
            <a href="index.php?p=dingdan_add">确定购买</a>
          </center>
          <br>
        </ul>
        <div class="clear"></div>
        <div id="page">{%$page%}</div>
        {%else%} 亲，您的购物车还是空的！ {%/if%} </div>
    </div>
    <!-- right -->
    <div class="clear"></div>
  </div>
  {%include file='bot.htm'%}</div>
<!-- body --> 
<br>
<br>
</body>
</html>
